<link rel="stylesheet" href="<?php base_url() ?>assets/css/application/choose.css">
<div class="page-titl">
	<div class="wrapper">
		<h1>CÂU HỎI THI HỌC SINH GIỎI</h1>
	</div>
</div>
<div class="content">
	<div class="choosetest tabs">
		<div class="wrapper">
			<ul class="option-list nav nav-tabs">
				<li role="presentation" ng-class="{active: viewSection==1}">
					<a href="" ng-click="viewSection=1">Lịch sử Việt Nam</a>
				</li>
				<li role="presentation"  ng-class="{active: viewSection==2}">
					<a href="" ng-click="viewSection=2">Lịch sử thế giới</a>
				</li>
			</ul>
		</div>
	</div>

	<div class="choosetest sections">

		<div class="wrapper">
			<!-- select set of question -->
			<div class="section question-list-page" ng-show="viewSection=='1'">
				<ul class="categories-list">
					<li>
						<p class="cat-titl" ng-class="{selected:vnFilter.cat==''}" ng-click="vnFilter.cat=''">Tất cả câu hỏi</p>
					</li>
					<li ng-repeat="cat in categories | catFilter:'vn'">
						<p class="cat-titl" ng-class="{selected:vnFilter.cat==cat._id}" ng-click="vnFilter.cat=cat._id">{{cat.name}}</p>
						<ul class="child">
							<li class="childs" ng-repeat="c in cat.child">
								<p class="cat-titl" ng-class="{selected:vnFilter.cat==c._id}" ng-click="vnFilter.cat=c._id">{{c.name}}</p>
							</li>
						</ul>
						
					</li>
				</ul>

				<ul class="questions-list">
					<li ng-repeat="q in questionList | regionFilter:'vn':'cat' | catArrFilter:vnFilter.cat:'cat' | vnSort:'question'">
						<a href="#/question/{{q._id.$id}}">{{$index+1}}/ {{q.question}}</a>
					</li>
				</ul>
			</div>

			<!-- select set of question -->
			<div class="section question-list-page" ng-show="viewSection=='2'">
				<ul class="categories-list">
					<li>
						<p class="cat-titl" ng-class="{selected:woFilter.cat==''}" ng-click="woFilter.cat=''">Tất cả câu hỏi</p>
					</li>
					<li ng-repeat="cat in categories | catFilter:'wo'">
						<p class="cat-titl" ng-class="{selected:woFilter.cat==cat._id}" ng-click="woFilter.cat=cat._id">{{cat.name}}</p>
						<ul class="child">
							<li class="childs" ng-repeat="c in cat.child">
								<p class="cat-titl" ng-class="{selected:woFilter.cat==c._id}" ng-click="woFilter.cat=c._id">{{c.name}}</p>
							</li>
						</ul>
						
					</li>
				</ul>

				<ul class="questions-list">
					<li ng-repeat="q in questionList | regionFilter:'tg':'cat' | catArrFilter:woFilter.cat:'cat' | vnSort:'question'">
						<a href="#/question/{{q._id.$id}}">{{$index+1}}/ {{q.question}}</a>
					</li>
				</ul>
			</div>			
		</div>
	</div>
</div>

<!-- =============================================================================== -->
<div id="confirmExam" class="modal fade" role="dialog" aria-labelledby="" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">&times;</span>
					<span class="sr-only">Close</span>
				</button>
				<h4 class="modal-title">XÁC NHẬN</h4>
			</div>
			<div class="modal-body">
				<p>
					Hãy kiểm tra lại bài, thời gian vẫn còn. <br>
					Bạn đồng ý hoàn thành bài thi chứ?
				</p>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">Bỏ qua</button>
				<button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="scoreAct()">Đồng ý</button>
			</div>
		</div>
	</div>
</div>
